from django.urls import path, re_path
from django.views.static import serve

from hello.views import HelloWorld, HelloCH, article_list, search, html, http_response, no_data_404, \
    article_detail, tag, test_filter, mine_filter
from my_project import settings

urlpatterns = [
    path('python/',HelloWorld,name='HelloWorld'),
    path('ch/',HelloCH,name='HelloCH'),
    re_path(r'^article/(?P<month>0?[1-9]|1[0-2])/$',article_list,name='article_list'),
    path('search/',search,name='search'),
    path('html/',html,name='html'),
    # path('index/',HomeView.as_view(),name='index'),
    path('req/',http_response,name='http_request'),
    path('nodata/',no_data_404,name='no_data_404'),
    path('detail/<int:article_id>',article_detail,name='article_detail'),
    path('tag/',tag, name='tag'),
    path('filter/',test_filter, name='test_filter'),
    path('mfilter/',mine_filter, name='mine_filter'),

]
